package com.tree.rpc.socket.consumer;

import com.alibaba.fastjson.JSON;
import com.tree.rpc.socket.remote.api.IUserService;
import com.tree.rpc.socket.remote.pojo.UserDTO;

/**
 * @ClassName com.tree.rpc.socket.consumer
 * Description: <类功能描述>. <br>
 * <p>
 * 消费者初始类
 * </p>
 * @Author tree
 * @Date 2019-11-07 00:47
 * @Version 1.0
 */
public class App {
    public static void main(String[] args) {
        //动态代理
        IUserService userService = ProxyFactory.getProxyService(IUserService.class);

        UserDTO userDTO = new UserDTO();
        userDTO.setUserName("tree1");
        userDTO.setPwd("1231");
        userDTO.setEmail("tree1@163.com");
        userDTO.setPhone(1231);

        System.out.println(JSON.toJSONString(userService.updateUser(userDTO)));
    }
}
